class A:
    def __init__(self, txt: str):
        self.t: C = None
        self.q: D = None
        self.r: C = None
        self.o: B = None
        self.v: F = None
        self.s: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.w: D = None
        self.q: D = None
        self.z: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.r: E = None
        self.o: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: A = None
        self.t: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.u: B = None
        self.w: D = None
        self.q: D = None
        self.z: A = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.r: E = None
        self.o: D = None
        self.txt = txt

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

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