class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.x: E = None
        self.v: C = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: J = None
        self.t: G = None
        self.y: A = None
        self.r: E = None
        self.z: D = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: B = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.s: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.o: J = None
        self.t: G = None
        self.y: A = None
        self.r: E = None
        self.z: D = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.x: B = None
        self.o: E = None
        self.s: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: H = None
        self.s: B = None
        self.txt = txt

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

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