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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: B = None
        self.w: A = None
        self.y: A = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

i.p = l
i.z = n
f.q = l
f.z = m
f.r = m
f.t = a
f.w = n
l.v = m
l.o = m
l.t = k
l.z = n
l.x = a
a.x = b
a.q = f
a.u = f
a.w = i
a.y = e
a.z = m
n.v = b
n.w = a
m.q = k
m.y = i
m.s = i
m.o = n
m.x = l
e.p = l
e.z = n
b.v = m
b.o = m
b.t = k
b.z = n
b.x = a
k.q = b
k.z = m
k.r = m
k.t = a
k.w = n
assert l.x.z.y.txt == "
class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.q: B = None
        self.w: A = None
        self.y: A = None
        self.z: F = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.w: D = None
        self.txt = txt

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

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

i.p = l
i.z = n
f.q = l
f.z = m
f.r = m
f.t = a
f.w = n
l.v = m
l.o = m
l.t = k
l.z = n
l.x = a
a.x = b
a.q = f
a.u = f
a.w = i
a.y = e
a.z = m
n.v = b
n.w = a
m.q = k
m.y = i
m.s = i
m.o = n
m.x = l
e.p = l
e.z = n
b.v = m
b.o = m
b.t = k
b.z = n
b.x = a
k.q = b
k.z = m
k.r = m
k.t = a
k.w = n
assert l.x.z.y.txt == "i"