class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: D = None
        self.o: F = None
        self.y: B = None
        self.t: D = None
        self.v: G = None
        self.p: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: E = None
        self.r: A = None
        self.v: G = None
        self.z: H = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.w: D = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: E = None
        self.r: A = None
        self.v: G = None
        self.z: H = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.r: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: B = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: A = None
        self.w: D = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

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

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