class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.o: G = None
        self.y: F = None
        self.u: B = None
        self.t: G = None
        self.w: G = None
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: D = None
        self.q: D = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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