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

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

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

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

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

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

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

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

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

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

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

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

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

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

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