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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: F = None
        self.v: A = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.y: B = None
        self.x: B = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: F = None
        self.v: A = None
        self.y: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: B = None
        self.y: B = None
        self.x: B = None
        self.v: B = None
        self.txt = txt

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

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