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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.q: J = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.z: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: G = None
        self.q: J = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: I = None
        self.t: H = None
        self.o: A = None
        self.p: B = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.u: F = None
        self.q: J = None
        self.s: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: B = None
        self.z: I = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.p: G = None
        self.q: J = None
        self.z: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: C = None
        self.r: I = None
        self.t: H = None
        self.o: A = None
        self.p: B = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

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