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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: H = None
        self.t: B = None
        self.z: H = None
        self.s: F = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: H = None
        self.t: B = None
        self.z: H = None
        self.s: F = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.p: B = None
        self.q: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: D = None
        self.v: D = None
        self.r: E = None
        self.txt = txt

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

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