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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.o: J = None
        self.q: I = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.y: J = None
        self.u: J = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: B = None
        self.o: C = None
        self.v: F = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.r: G = None
        self.o: J = None
        self.q: I = None
        self.s: E = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: I = None
        self.v: I = None
        self.y: J = None
        self.u: J = None
        self.z: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: B = None
        self.o: C = None
        self.v: F = None
        self.p: F = None
        self.s: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

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