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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.v: F = None
        self.q: A = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: A = None
        self.o: I = None
        self.u: J = None
        self.r: A = None
        self.x: A = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: I = None
        self.o: C = None
        self.t: B = None
        self.v: B = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: A = None
        self.v: F = None
        self.q: A = None
        self.x: E = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: A = None
        self.o: I = None
        self.u: J = None
        self.r: A = None
        self.x: A = None
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: D = None
        self.u: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: H = None
        self.u: I = None
        self.o: C = None
        self.t: B = None
        self.v: B = None
        self.s: D = None
        self.p: C = None
        self.txt = txt

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

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