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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.x: D = None
        self.v: D = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.q: B = None
        self.z: B = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

i = A("i")
d = B("d")
f = C("f")
b = D("b")
c = E("c")
n = F("n")
k = E("k")
a = F("a")

i.z = k
i.p = d
i.o = a
d.s = b
f.q = i
b.t = f
c.w = d
c.r = i
c.x = b
c.v = b
c.y = b
c.p = a
n.y = b
n.o = i
n.q = d
n.z = d
n.v = d
n.p = d
k.w = d
k.r = i
k.x = b
k.v = b
k.y = b
k.p = n
a.y = b
a.o = i
a.q = d
a.z = d
a.v = d
a.p = d
assert k.p.y.t.q.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.r: A = None
        self.x: D = None
        self.v: D = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: A = None
        self.q: B = None
        self.z: B = None
        self.v: B = None
        self.p: B = None
        self.txt = txt

i = A("i")
d = B("d")
f = C("f")
b = D("b")
c = E("c")
n = F("n")
k = E("k")
a = F("a")

i.z = k
i.p = d
i.o = a
d.s = b
f.q = i
b.t = f
c.w = d
c.r = i
c.x = b
c.v = b
c.y = b
c.p = a
n.y = b
n.o = i
n.q = d
n.z = d
n.v = d
n.p = d
k.w = d
k.r = i
k.x = b
k.v = b
k.y = b
k.p = n
a.y = b
a.o = i
a.q = d
a.z = d
a.v = d
a.p = d
assert k.p.y.t.q.txt == "i"