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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: J = None
        self.z: I = None
        self.w: F = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.x: B = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.z: D = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.v: E = None
        self.o: C = None
        self.y: C = None
        self.x: J = None
        self.z: C = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: J = None
        self.z: I = None
        self.w: F = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: C = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.x: B = None
        self.r: B = None
        self.y: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.z: D = None
        self.p: C = None
        self.w: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.s: G = None
        self.v: E = None
        self.o: C = None
        self.y: C = None
        self.x: J = None
        self.z: C = None
        self.u: C = None
        self.w: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

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

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