class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: G = None
        self.q: D = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.q: C = None
        self.x: A = None
        self.r: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.v: F = None
        self.t: H = None
        self.y: H = None
        self.r: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.y: E = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: H = None
        self.q: C = None
        self.x: A = None
        self.r: C = None
        self.v: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: B = None
        self.v: F = None
        self.t: H = None
        self.y: H = None
        self.r: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: H = None
        self.y: E = None
        self.x: A = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: G = None
        self.u: C = None
        self.p: B = None
        self.txt = txt

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

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