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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: D = None
        self.t: F = None
        self.p: E = None
        self.v: E = None
        self.w: H = None
        self.y: E = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: B = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.p: A = None
        self.s: E = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

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

l = A("l")
c = B("c")
f = C("f")
k = D("k")
e = E("e")
n = F("n")
h = G("h")
a = H("a")
m = H("m")
g = G("g")

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.o: D = None
        self.t: F = None
        self.p: E = None
        self.v: E = None
        self.w: H = None
        self.y: E = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.x: B = None
        self.s: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: H = None
        self.p: A = None
        self.s: E = None
        self.z: C = None
        self.u: E = None
        self.txt = txt

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

l = A("l")
c = B("c")
f = C("f")
k = D("k")
e = E("e")
n = F("n")
h = G("h")
a = H("a")
m = H("m")
g = G("g")

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