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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: G = None
        self.p: B = None
        self.x: B = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: J = None
        self.z: I = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.t: A = None
        self.x: J = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: G = None
        self.p: B = None
        self.x: B = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: J = None
        self.z: I = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.u: F = None
        self.t: A = None
        self.x: J = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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