class A:
    def __init__(self, txt: str):
        self.r: E = None
        self.t: E = None
        self.z: G = None
        self.q: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.z: G = None
        self.x: B = None
        self.s: B = None
        self.v: G = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: F = None
        self.p: E = None
        self.t: J = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: A = None
        self.z: G = None
        self.x: B = None
        self.s: B = None
        self.v: G = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: B = None
        self.p: I = None
        self.s: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: F = None
        self.p: E = None
        self.t: J = None
        self.txt = txt

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

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

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

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

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