class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.w: J = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.t: I = None
        self.o: A = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.q: G = None
        self.x: B = None
        self.p: B = None
        self.s: J = None
        self.w: B = None
        self.o: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.w: I = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: E = None
        self.t: I = None
        self.o: A = None
        self.q: H = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.q: H = None
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: G = None
        self.q: G = None
        self.x: B = None
        self.p: B = None
        self.s: J = None
        self.w: B = None
        self.o: J = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: B = None
        self.q: E = None
        self.w: I = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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