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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.w: C = None
        self.o: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.o: F = None
        self.z: H = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.s: G = None
        self.x: F = None
        self.w: B = None
        self.v: F = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.o: E = None
        self.q: E = None
        self.y: H = None
        self.r: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.p: H = None
        self.w: C = None
        self.o: D = None
        self.r: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: B = None
        self.o: F = None
        self.z: H = None
        self.p: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: B = None
        self.s: G = None
        self.x: F = None
        self.w: B = None
        self.v: F = None
        self.y: F = None
        self.p: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: D = None
        self.o: E = None
        self.q: E = None
        self.y: H = None
        self.r: A = None
        self.txt = txt

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

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

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