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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.r: C = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.r: E = None
        self.p: I = None
        self.y: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: J = None
        self.s: E = None
        self.x: D = None
        self.y: A = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: D = None
        self.x: B = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: G = None
        self.r: C = None
        self.t: I = None
        self.o: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: G = None
        self.z: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: E = None
        self.w: A = None
        self.r: E = None
        self.p: I = None
        self.y: E = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: A = None
        self.r: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: J = None
        self.s: E = None
        self.x: D = None
        self.y: A = None
        self.q: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: D = None
        self.x: B = None
        self.u: C = None
        self.q: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.o: C = None
        self.w: I = None
        self.p: I = None
        self.u: B = None
        self.txt = txt

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

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