class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: B = None
        self.z: E = None
        self.v: J = None
        self.o: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: I = None
        self.u: C = None
        self.w: I = None
        self.s: J = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: H = None
        self.v: A = None
        self.x: I = None
        self.y: J = None
        self.u: A = None
        self.o: H = None
        self.w: A = None
        self.q: J = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.r: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: I = None
        self.u: C = None
        self.w: I = None
        self.s: J = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: H = None
        self.v: A = None
        self.x: I = None
        self.y: J = None
        self.u: A = None
        self.o: H = None
        self.w: A = None
        self.q: J = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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