class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: G = None
        self.w: B = None
        self.t: B = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: E = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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