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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.s: E = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.z: A = None
        self.o: A = None
        self.x: A = None
        self.w: G = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.o: H = None
        self.q: E = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.z: D = None
        self.o: E = None
        self.r: A = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: C = None
        self.v: D = None
        self.x: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.w: E = None
        self.s: E = None
        self.u: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.z: A = None
        self.o: A = None
        self.x: A = None
        self.w: G = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: H = None
        self.z: D = None
        self.o: H = None
        self.q: E = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: F = None
        self.z: D = None
        self.o: E = None
        self.r: A = None
        self.p: E = None
        self.txt = txt

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

j.o = b
j.p = b
a.t = d
a.u = l
a.v = n
a.x = j
l.x = j
l.w = e
l.s = e
l.u = c
n.r = b
e.p = l
b.s = e
b.v = n
b.z = j
b.o = j
b.x = j
b.w = d
b.p = c
d.v = c
d.o = c
d.z = n
d.q = e
d.t = j
c.t = d
c.x = b
c.z = n
c.o = e
c.p = e
c.r = j
assert a.x.o.s.p.s.p.txt == "l"