class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.v: J = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.v: I = None
        self.w: H = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: I = None
        self.y: G = None
        self.x: F = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: H = None
        self.x: A = None
        self.s: E = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: A = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: D = None
        self.v: I = None
        self.w: H = None
        self.r: G = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.s: I = None
        self.y: G = None
        self.x: F = None
        self.w: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.y: A = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.q: H = None
        self.x: A = None
        self.s: E = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.q: A = None
        self.u: E = None
        self.r: F = None
        self.txt = txt

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

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