class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: H = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.y: G = None
        self.r: B = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: H = None
        self.t: D = None
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: A = None
        self.y: G = None
        self.r: B = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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