class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: H = None
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: H = None
        self.q: H = None
        self.v: A = None
        self.t: E = None
        self.w: E = None
        self.o: B = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: C = None
        self.q: H = None
        self.p: D = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: E = None
        self.z: I = None
        self.o: F = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: H = None
        self.q: H = None
        self.v: A = None
        self.t: E = None
        self.w: E = None
        self.o: B = None
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: C = None
        self.q: H = None
        self.p: D = None
        self.z: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: D = None
        self.v: E = None
        self.z: I = None
        self.o: F = None
        self.r: C = None
        self.x: E = None
        self.txt = txt

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

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