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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: H = None
        self.o: E = None
        self.x: F = None
        self.w: F = None
        self.q: D = None
        self.y: A = None
        self.v: J = None
        self.r: I = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: D = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.p: B = None
        self.t: C = None
        self.s: C = None
        self.r: B = None
        self.y: B = None
        self.o: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: H = None
        self.o: E = None
        self.x: F = None
        self.w: F = None
        self.q: D = None
        self.y: A = None
        self.v: J = None
        self.r: I = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.p: D = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: E = None
        self.p: B = None
        self.t: C = None
        self.s: C = None
        self.r: B = None
        self.y: B = None
        self.o: G = None
        self.txt = txt

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

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