class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: H = None
        self.o: H = None
        self.r: C = None
        self.z: F = None
        self.s: B = None
        self.q: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.t: A = None
        self.y: F = None
        self.u: D = None
        self.s: H = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: A = None
        self.x: G = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.v: B = None
        self.y: H = None
        self.p: G = None
        self.z: D = None
        self.u: A = None
        self.t: H = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: H = None
        self.t: A = None
        self.y: F = None
        self.u: D = None
        self.s: H = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: F = None
        self.w: A = None
        self.x: G = None
        self.t: G = None
        self.p: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.v: B = None
        self.y: H = None
        self.p: G = None
        self.z: D = None
        self.u: A = None
        self.t: H = None
        self.txt = txt

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

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

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

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