class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: A = None
        self.o: H = None
        self.x: C = None
        self.v: C = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: H = None
        self.t: A = None
        self.o: H = None
        self.x: C = None
        self.v: C = None
        self.p: A = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

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

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

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