class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.y: B = None
        self.t: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: C = None
        self.p: F = None
        self.y: B = None
        self.t: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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