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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.x: A = None
        self.o: C = None
        self.w: H = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

a = A("a")
f = B("f")
e = C("e")
c = D("c")
n = E("n")
b = F("b")
d = G("d")
g = H("g")
k = A("k")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: C = None
        self.x: A = None
        self.o: C = None
        self.w: H = None
        self.y: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: E = None
        self.p: E = None
        self.txt = txt

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

a = A("a")
f = B("f")
e = C("e")
c = D("c")
n = E("n")
b = F("b")
d = G("d")
g = H("g")
k = A("k")

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