class A:
    def __init__(self, txt: str):
        self.p: G = None
        self.v: G = None
        self.t: H = None
        self.r: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.r: F = None
        self.o: D = None
        self.x: C = None
        self.w: C = None
        self.q: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: B = None
        self.p: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: J = None
        self.q: A = None
        self.t: D = None
        self.s: I = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.w: A = None
        self.z: H = None
        self.r: J = None
        self.s: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: G = None
        self.r: F = None
        self.o: D = None
        self.x: C = None
        self.w: C = None
        self.q: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: I = None
        self.y: B = None
        self.p: A = None
        self.s: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.r: J = None
        self.q: A = None
        self.t: D = None
        self.s: I = None
        self.p: G = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: E = None
        self.w: A = None
        self.z: H = None
        self.r: J = None
        self.s: B = None
        self.txt = txt

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

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

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