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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.x: D = None
        self.p: A = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.u: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.x: D = None
        self.p: A = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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