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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: E = None
        self.u: D = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.q: B = None
        self.txt = txt

i = A("i")
a = B("a")
l = C("l")
c = D("c")
g = E("g")
h = F("h")
j = C("j")
d = D("d")

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: E = None
        self.u: D = None
        self.z: B = None
        self.v: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: C = None
        self.q: B = None
        self.txt = txt

i = A("i")
a = B("a")
l = C("l")
c = D("c")
g = E("g")
h = F("h")
j = C("j")
d = D("d")

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