class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: D = None
        self.w: J = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: A = None
        self.t: B = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: J = None
        self.s: I = None
        self.o: I = None
        self.x: F = None
        self.v: I = None
        self.t: I = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: E = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.v: D = None
        self.w: J = None
        self.u: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: I = None
        self.y: A = None
        self.t: B = None
        self.v: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: J = None
        self.s: I = None
        self.o: I = None
        self.x: F = None
        self.v: I = None
        self.t: I = None
        self.u: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: D = None
        self.t: G = None
        self.txt = txt

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

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

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