class A:
    def __init__(self, txt: str):
        self.u: C = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.q: C = None
        self.u: E = None
        self.o: B = None
        self.r: A = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.x: F = None
        self.v: F = None
        self.p: F = None
        self.q: F = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: E = None
        self.q: C = None
        self.u: E = None
        self.o: B = None
        self.r: A = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.x: F = None
        self.v: F = None
        self.p: F = None
        self.q: F = None
        self.o: I = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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