class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.v: F = None
        self.w: H = None
        self.q: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: J = None
        self.o: A = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.y: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: I = None
        self.txt = txt

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

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

c = A("c")
a = B("a")
b = C("b")
i = D("i")
g = E("g")
d = F("d")
k = G("k")
m = H("m")
h = I("h")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: J = None
        self.o: A = None
        self.r: G = None
        self.u: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: D = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: B = None
        self.y: E = None
        self.t: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: I = None
        self.txt = txt

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

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

c = A("c")
a = B("a")
b = C("b")
i = D("i")
g = E("g")
d = F("d")
k = G("k")
m = H("m")
h = I("h")
j = J("j")

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