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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.txt = txt

m = A("m")
b = B("b")
l = C("l")
c = D("c")
n = E("n")
j = F("j")
g = G("g")
e = H("e")
d = A("d")

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: B = None
        self.w: E = None
        self.u: F = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: H = None
        self.o: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.txt = txt

m = A("m")
b = B("b")
l = C("l")
c = D("c")
n = E("n")
j = F("j")
g = G("g")
e = H("e")
d = A("d")

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