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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: D = None
        self.y: B = None
        self.txt = txt

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

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

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