class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: I = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.p: D = None
        self.q: F = None
        self.u: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.z: H = None
        self.v: F = None
        self.p: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.v: F = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.w: H = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: G = None
        self.v: B = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.r: A = None
        self.y: H = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: I = None
        self.o: A = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: D = None
        self.w: F = None
        self.p: D = None
        self.q: F = None
        self.u: I = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: H = None
        self.z: H = None
        self.v: F = None
        self.p: F = None
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.o: H = None
        self.v: F = None
        self.s: B = None
        self.r: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: A = None
        self.w: H = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: G = None
        self.v: B = None
        self.y: B = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: C = None
        self.r: A = None
        self.y: H = None
        self.z: F = None
        self.txt = txt

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

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