class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: C = None
        self.y: B = None
        self.o: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: G = None
        self.s: G = None
        self.z: B = None
        self.p: E = None
        self.u: C = None
        self.y: F = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: C = None
        self.o: D = None
        self.q: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: G = None
        self.s: G = None
        self.z: B = None
        self.p: E = None
        self.u: C = None
        self.y: F = None
        self.x: F = None
        self.w: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: C = None
        self.y: C = None
        self.o: D = None
        self.q: I = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

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

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