class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.z: D = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: G = None
        self.p: H = None
        self.t: B = None
        self.u: H = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
e = D("e")
a = E("a")
g = F("g")
b = G("b")
m = H("m")
l = F("l")
i = B("i")

k.t = e
k.r = e
k.z = e
k.x = b
c.q = b
c.v = b
c.p = m
c.u = m
c.r = m
c.t = i
c.z = a
d.r = m
e.w = d
e.v = c
e.r = c
e.p = k
a.t = b
g.u = l
b.z = l
b.t = l
b.y = g
b.u = a
b.o = c
b.x = d
b.s = d
b.v = e
m.w = b
l.u = g
i.q = b
i.v = b
i.p = m
i.u = m
i.r = m
i.t = c
i.z = a
assert l.u.u.u.u.u.u.u.u.u.u.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: D = None
        self.z: D = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.v: G = None
        self.p: H = None
        self.t: B = None
        self.u: H = None
        self.z: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: B = None
        self.r: B = None
        self.p: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

k = A("k")
c = B("c")
d = C("d")
e = D("e")
a = E("a")
g = F("g")
b = G("b")
m = H("m")
l = F("l")
i = B("i")

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