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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.t: D = None
        self.s: I = None
        self.y: H = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.x: E = None
        self.r: A = None
        self.o: D = None
        self.z: C = None
        self.t: A = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: F = None
        self.p: D = None
        self.s: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: G = None
        self.t: D = None
        self.s: I = None
        self.y: H = None
        self.u: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.r: B = None
        self.w: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: E = None
        self.x: E = None
        self.r: A = None
        self.o: D = None
        self.z: C = None
        self.t: A = None
        self.y: I = None
        self.q: G = None
        self.txt = txt

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

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