class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.p: F = None
        self.o: J = None
        self.w: G = None
        self.y: C = None
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: J = None
        self.y: E = None
        self.w: B = None
        self.x: F = None
        self.t: F = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: J = None
        self.z: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: J = None
        self.y: E = None
        self.w: B = None
        self.x: F = None
        self.t: F = None
        self.r: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: J = None
        self.z: J = None
        self.y: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.w: E = None
        self.o: E = None
        self.r: D = None
        self.txt = txt

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

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