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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.s: E = None
        self.y: C = None
        self.u: C = None
        self.z: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: G = None
        self.v: C = None
        self.s: E = None
        self.y: C = None
        self.u: C = None
        self.z: H = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

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