class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: E = None
        self.s: G = None
        self.w: B = None
        self.x: H = None
        self.p: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: B = None
        self.r: B = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.o: H = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

a = A("a")
l = B("l")
d = C("d")
h = D("h")
i = E("i")
m = F("m")
b = G("b")
n = H("n")
e = B("e")

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

class B:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: F = None
        self.s: B = None
        self.r: B = None
        self.y: C = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: E = None
        self.o: H = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: D = None
        self.txt = txt

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

a = A("a")
l = B("l")
d = C("d")
h = D("h")
i = E("i")
m = F("m")
b = G("b")
n = H("n")
e = B("e")

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