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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.p: E = None
        self.y: J = None
        self.q: H = None
        self.s: I = None
        self.u: I = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.w: H = None
        self.s: E = None
        self.z: A = None
        self.v: H = None
        self.q: I = None
        self.u: A = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.x: C = None
        self.p: E = None
        self.y: J = None
        self.q: H = None
        self.s: I = None
        self.u: I = None
        self.v: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.q: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.w: H = None
        self.s: E = None
        self.z: A = None
        self.v: H = None
        self.q: I = None
        self.u: A = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

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

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