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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.w: D = None
        self.p: A = None
        self.o: C = None
        self.u: E = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

b = A("b")
c = B("c")
a = C("a")
k = D("k")
e = E("e")
h = F("h")
d = G("d")
l = H("l")

b.o = d
b.w = d
b.y = h
c.u = k
c.o = e
c.y = e
c.r = h
c.t = d
c.q = a
c.p = b
a.s = d
a.u = c
k.o = e
e.w = k
e.y = h
e.u = h
e.x = c
h.z = b
h.x = b
h.p = b
h.w = k
h.o = a
h.u = e
h.y = e
h.r = c
d.s = b
l.y = a
assert a.s.s.y.r.q.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: G = None
        self.y: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: F = None
        self.x: B = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: A = None
        self.w: D = None
        self.p: A = None
        self.o: C = None
        self.u: E = None
        self.y: E = None
        self.r: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

b = A("b")
c = B("c")
a = C("a")
k = D("k")
e = E("e")
h = F("h")
d = G("d")
l = H("l")

b.o = d
b.w = d
b.y = h
c.u = k
c.o = e
c.y = e
c.r = h
c.t = d
c.q = a
c.p = b
a.s = d
a.u = c
k.o = e
e.w = k
e.y = h
e.u = h
e.x = c
h.z = b
h.x = b
h.p = b
h.w = k
h.o = a
h.u = e
h.y = e
h.r = c
d.s = b
l.y = a
assert a.s.s.y.r.q.s.s.txt == "b"