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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.t: I = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: J = None
        self.r: C = None
        self.p: H = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: D = None
        self.t: I = None
        self.q: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: J = None
        self.x: J = None
        self.r: C = None
        self.p: H = None
        self.u: D = None
        self.txt = txt

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

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

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