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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.r: A = None
        self.w: D = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: C = None
        self.t: C = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

f.p = c
f.x = g
f.o = g
f.z = g
f.w = i
f.v = j
j.q = i
j.u = f
j.r = f
j.t = f
j.w = e
j.p = g
i.y = c
i.p = c
d.o = i
d.u = c
g.u = c
c.x = i
c.v = i
c.t = i
c.z = f
c.u = g
a.o = i
a.u = c
e.o = i
e.u = c
assert a.u.z.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: E = None
        self.o: E = None
        self.w: C = None
        self.v: B = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: A = None
        self.r: A = None
        self.w: D = None
        self.t: A = None
        self.p: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: C = None
        self.t: C = None
        self.z: A = None
        self.u: E = None
        self.txt = txt

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

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