class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: F = None
        self.q: D = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.s: C = None
        self.w: B = None
        self.q: A = None
        self.u: D = None
        self.z: I = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.t: I = None
        self.o: G = None
        self.r: B = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.t: I = None
        self.q: H = None
        self.s: H = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.o: A = None
        self.r: C = None
        self.q: D = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: F = None
        self.q: D = None
        self.z: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.v: I = None
        self.s: C = None
        self.w: B = None
        self.q: A = None
        self.u: D = None
        self.z: I = None
        self.p: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.s: I = None
        self.t: I = None
        self.o: G = None
        self.r: B = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.y: C = None
        self.t: I = None
        self.q: H = None
        self.s: H = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.z: C = None
        self.o: A = None
        self.r: C = None
        self.q: D = None
        self.u: F = None
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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