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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.v: C = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: C = None
        self.o: D = None
        self.r: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.o: B = None
        self.txt = txt

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

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

i.q = b
i.s = b
i.t = n
i.p = n
i.z = f
i.o = m
n.s = i
n.x = i
n.v = b
b.v = e
b.s = m
f.v = l
f.r = m
f.t = c
m.p = k
m.z = b
m.r = b
m.o = f
l.q = n
e.r = b
e.o = k
c.y = m
c.s = f
k.s = i
k.x = i
k.v = b
j.r = b
j.o = n
assert c.y.o.v.q.s.o.p.s.o.r.txt == "b"