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

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

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: A = None
        self.t: E = None
        self.p: C = None
        self.y: A = None
        self.w: E = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: D = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: A = None
        self.p: A = None
        self.q: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: A = None
        self.t: E = None
        self.p: C = None
        self.y: A = None
        self.w: E = None
        self.r: C = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: H = None
        self.t: D = None
        self.s: D = None
        self.x: F = None
        self.txt = txt

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

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