class A:
    def __init__(self, txt: str):
        self.s: A = None
        self.q: E = None
        self.u: B = None
        self.t: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: E = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: E = None
        self.t: B = None
        self.r: C = None
        self.txt = txt

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

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