class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.y: F = None
        self.t: B = None
        self.q: B = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.y: A = None
        self.v: J = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.x: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.o: C = None
        self.y: F = None
        self.t: B = None
        self.q: B = None
        self.s: C = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: B = None
        self.o: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.y: A = None
        self.v: J = None
        self.p: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.s: E = None
        self.txt = txt

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

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