class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.r: A = None
        self.u: C = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

d = A("d")
f = B("f")
n = C("n")
g = D("g")
e = E("e")
h = F("h")
j = A("j")
k = D("k")
c = A("c")

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

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

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

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

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

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

d = A("d")
f = B("f")
n = C("n")
g = D("g")
e = E("e")
h = F("h")
j = A("j")
k = D("k")
c = A("c")

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