class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: I = None
        self.p: H = None
        self.t: H = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: G = None
        self.q: I = None
        self.p: F = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.z: I = None
        self.p: H = None
        self.t: H = None
        self.y: G = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: G = None
        self.q: I = None
        self.p: F = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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