class A:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.w: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.x: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.t: B = None
        self.p: B = None
        self.s: C = None
        self.x: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.v: D = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: D = None
        self.x: F = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

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

b = A("b")
a = B("a")
j = C("j")
i = D("i")
g = E("g")
h = F("h")
n = G("n")
c = D("c")
k = F("k")

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: D = None
        self.s: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: A = None
        self.x: F = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: E = None
        self.t: B = None
        self.p: B = None
        self.s: C = None
        self.x: B = None
        self.y: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.v: D = None
        self.p: F = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: D = None
        self.x: F = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

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

b = A("b")
a = B("a")
j = C("j")
i = D("i")
g = E("g")
h = F("h")
n = G("n")
c = D("c")
k = F("k")

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