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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.o: G = None
        self.t: A = None
        self.u: B = None
        self.z: H = None
        self.txt = txt

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

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

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

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

j = A("j")
k = B("k")
m = C("m")
g = D("g")
l = E("l")
h = F("h")
b = G("b")
i = H("i")

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: H = None
        self.o: G = None
        self.t: A = None
        self.u: B = None
        self.z: H = None
        self.txt = txt

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

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

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

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

j = A("j")
k = B("k")
m = C("m")
g = D("g")
l = E("l")
h = F("h")
b = G("b")
i = H("i")

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