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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.r: E = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: B = None
        self.v: B = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

g = A("g")
f = B("f")
a = C("a")
k = D("k")
e = E("e")
l = F("l")
b = E("b")
d = D("d")
i = B("i")

g.o = l
f.t = k
f.z = i
a.o = l
a.z = l
a.u = l
k.p = g
e.p = i
e.x = i
e.o = g
e.r = b
e.v = a
l.t = a
l.x = f
l.v = f
l.u = f
l.o = i
b.p = i
b.x = i
b.o = g
b.r = e
b.v = a
d.p = g
i.t = d
i.z = f
assert k.p.o.o.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: A = None
        self.r: E = None
        self.v: C = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: B = None
        self.v: B = None
        self.u: B = None
        self.o: B = None
        self.txt = txt

g = A("g")
f = B("f")
a = C("a")
k = D("k")
e = E("e")
l = F("l")
b = E("b")
d = D("d")
i = B("i")

g.o = l
f.t = k
f.z = i
a.o = l
a.z = l
a.u = l
k.p = g
e.p = i
e.x = i
e.o = g
e.r = b
e.v = a
l.t = a
l.x = f
l.v = f
l.u = f
l.o = i
b.p = i
b.x = i
b.o = g
b.r = e
b.v = a
d.p = g
i.t = d
i.z = f
assert k.p.o.o.z.z.txt == "i"