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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.y: C = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: F = None
        self.x: F = None
        self.v: B = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.y: C = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.y: F = None
        self.x: F = None
        self.v: B = None
        self.w: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: D = None
        self.p: I = None
        self.txt = txt

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

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