class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: D = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.t: A = None
        self.q: F = None
        self.z: D = None
        self.s: D = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: H = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.o: D = None
        self.t: A = None
        self.q: F = None
        self.z: D = None
        self.s: D = None
        self.u: G = None
        self.x: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: H = None
        self.p: B = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: B = None
        self.txt = txt

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

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