class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: D = None
        self.q: D = None
        self.o: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: G = None
        self.s: G = None
        self.r: E = None
        self.o: B = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.s: G = None
        self.x: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: G = None
        self.s: G = None
        self.r: E = None
        self.o: B = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: G = None
        self.s: G = None
        self.x: E = None
        self.txt = txt

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

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

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

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