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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.x: E = None
        self.t: C = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: I = None
        self.w: J = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: B = None
        self.x: J = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.w: B = None
        self.p: F = None
        self.z: I = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.y: E = None
        self.p: G = None
        self.u: F = None
        self.q: B = None
        self.x: E = None
        self.w: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: B = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: F = None
        self.x: E = None
        self.t: C = None
        self.v: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: I = None
        self.w: J = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.y: B = None
        self.x: J = None
        self.p: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.w: B = None
        self.p: F = None
        self.z: I = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.t: D = None
        self.y: E = None
        self.p: G = None
        self.u: F = None
        self.q: B = None
        self.x: E = None
        self.w: I = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.z: G = None
        self.o: B = None
        self.q: A = None
        self.x: G = None
        self.txt = txt

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

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