class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: E = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: G = None
        self.q: A = None
        self.p: I = None
        self.t: I = None
        self.y: I = None
        self.z: B = None
        self.s: G = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.r: H = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: E = None
        self.v: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: A = None
        self.v: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.v: G = None
        self.q: A = None
        self.p: I = None
        self.t: I = None
        self.y: I = None
        self.z: B = None
        self.s: G = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.s: B = None
        self.r: H = None
        self.t: A = None
        self.txt = txt

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

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