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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.r: E = None
        self.o: B = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.y: A = None
        self.t: F = None
        self.z: F = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: B = None
        self.r: E = None
        self.o: B = None
        self.v: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.p: D = None
        self.y: A = None
        self.t: F = None
        self.z: F = None
        self.s: F = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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