diff --git a/SmartList/.gitignore b/SmartList/.gitignore
new file mode 100644
index 0000000..345e61a
--- /dev/null
+++ b/SmartList/.gitignore
@@ -0,0 +1,49 @@
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
+# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
+
+# User-specific stuff:
+.idea/**/workspace.xml
+.idea/**/tasks.xml
+.idea/dictionaries
+
+# Sensitive or high-churn files:
+.idea/**/dataSources/
+.idea/**/dataSources.ids
+.idea/**/dataSources.xml
+.idea/**/dataSources.local.xml
+.idea/**/sqlDataSources.xml
+.idea/**/dynamic.xml
+.idea/**/uiDesigner.xml
+
+# Gradle:
+.idea/**/gradle.xml
+.idea/**/libraries
+
+# CMake
+cmake-build-debug/
+
+# Mongo Explorer plugin:
+.idea/**/mongoSettings.xml
+
+## File-based project format:
+*.iws
+
+## Plugin-specific files:
+
+# IntelliJ
+out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Cursive Clojure plugin
+.idea/replstate.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
+crashlytics-build.properties
+fabric.properties
diff --git a/SmartList/.idea/compiler.xml b/SmartList/.idea/compiler.xml
new file mode 100644
index 0000000..8b18b7f
--- /dev/null
+++ b/SmartList/.idea/compiler.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmartList/.idea/misc.xml b/SmartList/.idea/misc.xml
new file mode 100644
index 0000000..e8942bd
--- /dev/null
+++ b/SmartList/.idea/misc.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmartList/.idea/modules.xml b/SmartList/.idea/modules.xml
new file mode 100644
index 0000000..e7722ac
--- /dev/null
+++ b/SmartList/.idea/modules.xml
@@ -0,0 +1,8 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmartList/ds.iml b/SmartList/ds.iml
new file mode 100644
index 0000000..2152b2b
--- /dev/null
+++ b/SmartList/ds.iml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/SmartList/pom.xml b/SmartList/pom.xml
new file mode 100644
index 0000000..5c5e9e3
--- /dev/null
+++ b/SmartList/pom.xml
@@ -0,0 +1,41 @@
+
+
+ 4.0.0
+
+ ru.spbau.mit.kazakov.SpiralMatrix
+ SmartList
+ 1.0-SNAPSHOT
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+
+ 1.8
+ 1.8
+
+
+
+
+
+
+
+ junit
+ junit
+ 4.12
+
+
+ org.jetbrains
+ annotations
+ 13.0
+
+
+ org.apache.commons
+ commons-collections4
+ 4.0
+
+
+
+
\ No newline at end of file
diff --git a/SmartList/src/main/java/ru/spbau/mit/kazakov/SmartList/SmartList.java b/SmartList/src/main/java/ru/spbau/mit/kazakov/SmartList/SmartList.java
new file mode 100644
index 0000000..26330c2
--- /dev/null
+++ b/SmartList/src/main/java/ru/spbau/mit/kazakov/SmartList/SmartList.java
@@ -0,0 +1,192 @@
+package ru.spbau.mit.kazakov.SmartList;
+
+import org.apache.commons.collections4.iterators.EmptyIterator;
+import org.apache.commons.collections4.iterators.SingletonIterator;
+import org.jetbrains.annotations.NotNull;
+
+import java.util.*;
+
+/**
+ * Smart list storage. Store one element using one reference, 2-5 element using an array, and more elements using ArrayList.
+ * @param generic type
+ */
+public class SmartList extends AbstractList implements List {
+ private int size;
+ private Object data;
+
+ /**
+ * Creates new empty list.
+ */
+ public SmartList() {
+ size = 0;
+ data = null;
+ }
+
+ /**
+ * Creates new list containing elements from specified collection.
+ *
+ * @param collection specified collection
+ */
+ public SmartList(@NotNull Collection extends E> collection) {
+ for (E elem : collection) {
+ add(elem);
+ }
+ }
+
+ /**
+ * Returns elements by specified index.
+ *
+ * @param i specified index
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public E get(int i) {
+ if (i >= size) {
+ throw new IndexOutOfBoundsException();
+ }
+
+ if (size == 1) {
+ return (E) data;
+ } else if (size <= 5) {
+ return (E) ((Object[]) data)[i];
+ } else {
+ return (E) ((ArrayList