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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.v: C = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: A = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: A = None
        self.r: F = None
        self.v: C = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

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

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

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