class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: E = None
        self.x: I = None
        self.u: I = None
        self.p: I = None
        self.s: G = None
        self.o: J = None
        self.y: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: I = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: I = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: F = None
        self.y: D = None
        self.t: I = None
        self.x: G = None
        self.u: B = None
        self.w: A = None
        self.z: B = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: J = None
        self.p: D = None
        self.v: J = None
        self.t: D = None
        self.o: D = None
        self.u: J = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: I = None
        self.o: G = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: I = None
        self.w: C = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.o: F = None
        self.y: D = None
        self.t: I = None
        self.x: G = None
        self.u: B = None
        self.w: A = None
        self.z: B = None
        self.p: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: J = None
        self.p: D = None
        self.v: J = None
        self.t: D = None
        self.o: D = None
        self.u: J = None
        self.txt = txt

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

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

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