class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: D = None
        self.s: B = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.q: E = None
        self.w: F = None
        self.z: H = None
        self.s: D = None
        self.u: G = None
        self.r: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: B = None
        self.o: I = None
        self.v: B = None
        self.p: G = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.p: F = None
        self.r: G = None
        self.y: B = None
        self.x: B = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.o: D = None
        self.q: G = None
        self.t: F = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.x: H = None
        self.s: B = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

i = A("i")
c = B("c")
k = C("k")
g = D("g")
a = E("a")
m = F("m")
l = G("l")
d = H("d")
b = I("b")
e = H("e")

i.q = b
i.w = g
i.z = g
i.s = c
i.o = l
c.s = a
k.t = l
k.u = l
k.x = c
k.q = a
k.w = m
k.p = m
k.z = e
k.s = g
k.r = i
g.z = d
g.u = c
g.v = c
g.o = b
g.p = l
g.q = m
g.w = i
a.u = d
a.o = c
a.y = c
a.x = c
a.p = m
a.r = l
a.s = b
m.v = b
l.s = i
d.s = m
d.t = m
d.r = c
d.o = g
d.q = l
d.w = b
b.o = i
b.t = i
b.x = e
b.u = e
b.s = c
b.r = l
e.s = m
e.t = m
e.r = c
e.o = g
e.q = l
e.w = b
assert i.q.r.s.q.r.s.txt == "
class A:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: D = None
        self.s: B = None
        self.z: D = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.q: E = None
        self.w: F = None
        self.z: H = None
        self.s: D = None
        self.u: G = None
        self.r: A = None
        self.p: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: B = None
        self.o: I = None
        self.v: B = None
        self.p: G = None
        self.q: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.o: B = None
        self.p: F = None
        self.r: G = None
        self.y: B = None
        self.x: B = None
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.r: B = None
        self.o: D = None
        self.q: G = None
        self.t: F = None
        self.w: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.x: H = None
        self.s: B = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

i = A("i")
c = B("c")
k = C("k")
g = D("g")
a = E("a")
m = F("m")
l = G("l")
d = H("d")
b = I("b")
e = H("e")

i.q = b
i.w = g
i.z = g
i.s = c
i.o = l
c.s = a
k.t = l
k.u = l
k.x = c
k.q = a
k.w = m
k.p = m
k.z = e
k.s = g
k.r = i
g.z = d
g.u = c
g.v = c
g.o = b
g.p = l
g.q = m
g.w = i
a.u = d
a.o = c
a.y = c
a.x = c
a.p = m
a.r = l
a.s = b
m.v = b
l.s = i
d.s = m
d.t = m
d.r = c
d.o = g
d.q = l
d.w = b
b.o = i
b.t = i
b.x = e
b.u = e
b.s = c
b.r = l
e.s = m
e.t = m
e.r = c
e.o = g
e.q = l
e.w = b
assert i.q.r.s.q.r.s.txt == "i"