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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: A = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.y: F = None
        self.w: E = None
        self.x: B = None
        self.s: A = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.y: A = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: D = None
        self.y: F = None
        self.w: E = None
        self.x: B = None
        self.s: A = None
        self.z: F = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: A = None
        self.txt = txt

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

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

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