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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.q: C = None
        self.z: B = None
        self.v: D = None
        self.y: J = None
        self.s: B = None
        self.u: A = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: A = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.q: C = None
        self.z: B = None
        self.v: D = None
        self.y: J = None
        self.s: B = None
        self.u: A = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.y: H = None
        self.txt = txt

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

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

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