class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: C = None
        self.v: I = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.x: F = None
        self.p: D = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.r: I = None
        self.o: I = None
        self.w: G = None
        self.x: F = None
        self.u: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: J = None
        self.u: I = None
        self.z: C = None
        self.t: G = None
        self.y: I = None
        self.x: G = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.p: E = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.v: D = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.v: C = None
        self.x: F = None
        self.p: D = None
        self.u: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.p: B = None
        self.r: I = None
        self.o: I = None
        self.w: G = None
        self.x: F = None
        self.u: C = None
        self.y: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: J = None
        self.u: I = None
        self.z: C = None
        self.t: G = None
        self.y: I = None
        self.x: G = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: F = None
        self.p: E = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: G = None
        self.v: D = None
        self.u: F = None
        self.t: C = None
        self.txt = txt

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

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

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

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