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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: I = None
        self.x: D = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: E = None
        self.w: A = None
        self.z: I = None
        self.x: E = None
        self.t: B = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.p: B = None
        self.u: D = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: I = None
        self.x: D = None
        self.p: D = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.x: I = None
        self.q: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: J = None
        self.u: E = None
        self.w: A = None
        self.z: I = None
        self.x: E = None
        self.t: B = None
        self.v: H = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: E = None
        self.p: B = None
        self.u: D = None
        self.s: E = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.txt = txt

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

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