class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: G = None
        self.q: I = None
        self.o: F = None
        self.t: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: G = None
        self.p: E = None
        self.q: A = None
        self.s: H = None
        self.u: G = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: C = None
        self.y: C = None
        self.s: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: E = None
        self.o: F = None
        self.q: D = None
        self.t: B = None
        self.w: I = None
        self.s: I = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.x: G = None
        self.p: E = None
        self.q: A = None
        self.s: H = None
        self.u: G = None
        self.o: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: C = None
        self.y: C = None
        self.s: C = None
        self.o: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: E = None
        self.o: F = None
        self.q: D = None
        self.t: B = None
        self.w: I = None
        self.s: I = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: G = None
        self.p: H = None
        self.txt = txt

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

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

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