class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.p: I = None
        self.r: H = None
        self.s: J = None
        self.y: B = None
        self.q: H = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.q: E = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.p: A = None
        self.y: C = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: J = None
        self.y: G = None
        self.z: B = None
        self.w: I = None
        self.o: C = None
        self.s: H = None
        self.u: I = None
        self.p: J = None
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: H = None
        self.s: J = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: C = None
        self.q: E = None
        self.p: F = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.s: B = None
        self.p: A = None
        self.y: C = None
        self.u: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.r: J = None
        self.y: G = None
        self.z: B = None
        self.w: I = None
        self.o: C = None
        self.s: H = None
        self.u: I = None
        self.p: J = None
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: H = None
        self.s: J = None
        self.v: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

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