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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: H = None
        self.z: J = None
        self.x: F = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.t: J = None
        self.p: D = None
        self.x: B = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.z: J = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: F = None
        self.o: F = None
        self.t: B = None
        self.s: A = None
        self.p: H = None
        self.r: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: H = None
        self.z: J = None
        self.x: F = None
        self.s: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: G = None
        self.t: J = None
        self.p: D = None
        self.x: B = None
        self.q: B = None
        self.o: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: C = None
        self.y: F = None
        self.z: J = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: G = None
        self.z: F = None
        self.o: F = None
        self.t: B = None
        self.s: A = None
        self.p: H = None
        self.r: I = None
        self.txt = txt

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

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