class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.r: J = None
        self.v: C = None
        self.w: D = None
        self.q: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: J = None
        self.x: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

j = A("j")
n = B("n")
h = C("h")
m = D("m")
d = E("d")
e = F("e")
l = G("l")
b = H("b")
a = I("a")
c = J("c")

j.x = b
j.y = a
n.y = j
n.s = j
n.x = e
n.v = e
n.t = e
n.r = m
n.w = h
n.p = c
n.u = c
h.w = m
h.t = j
m.o = d
m.z = h
m.y = c
d.x = m
d.w = m
d.y = m
d.z = n
d.r = c
d.q = c
d.v = h
e.x = b
l.y = d
b.t = d
b.y = d
b.v = d
b.w = d
b.o = l
b.q = l
b.p = m
b.x = c
b.u = h
b.z = j
a.u = l
a.y = c
a.x = c
a.v = j
c.t = j
c.p = j
c.r = e
c.q = n
assert b.x.r.x.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: I = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: B = None
        self.r: J = None
        self.v: C = None
        self.w: D = None
        self.q: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: J = None
        self.x: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.r: F = None
        self.p: A = None
        self.q: B = None
        self.txt = txt

j = A("j")
n = B("n")
h = C("h")
m = D("m")
d = E("d")
e = F("e")
l = G("l")
b = H("b")
a = I("a")
c = J("c")

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