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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: H = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.q: I = None
        self.y: J = None
        self.t: E = None
        self.w: E = None
        self.s: D = None
        self.v: E = None
        self.r: B = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: B = None
        self.z: D = None
        self.u: B = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: H = None
        self.v: D = None
        self.z: A = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: B = None
        self.x: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: B = None
        self.q: I = None
        self.y: J = None
        self.t: E = None
        self.w: E = None
        self.s: D = None
        self.v: E = None
        self.r: B = None
        self.z: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: B = None
        self.z: D = None
        self.u: B = None
        self.r: D = None
        self.v: D = None
        self.txt = txt

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

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