class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: B = None
        self.x: B = None
        self.o: H = None
        self.z: H = None
        self.u: B = None
        self.q: A = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.v: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.x: B = None
        self.z: A = None
        self.t: G = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.s: D = None
        self.v: E = None
        self.p: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.p: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.x: B = None
        self.z: A = None
        self.t: G = None
        self.u: A = None
        self.p: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: A = None
        self.txt = txt

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

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