class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.u: B = None
        self.v: C = None
        self.x: D = None
        self.o: C = None
        self.r: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: A = None
        self.u: A = None
        self.s: A = None
        self.q: C = None
        self.txt = txt

e = A("e")
h = B("h")
n = C("n")
m = D("m")
c = E("c")
g = F("g")
j = B("j")
a = F("a")
l = D("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: A = None
        self.r: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: A = None
        self.u: A = None
        self.s: A = None
        self.q: C = None
        self.txt = txt

e = A("e")
h = B("h")
n = C("n")
m = D("m")
c = E("c")
g = F("g")
j = B("j")
a = F("a")
l = D("l")

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