class A:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: H = None
        self.v: F = None
        self.s: E = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: C = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: H = None
        self.v: F = None
        self.s: E = None
        self.o: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.u: F = None
        self.p: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: C = None
        self.q: E = None
        self.r: E = None
        self.txt = txt

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

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