class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.v: E = None
        self.w: E = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.s: E = None
        self.p: A = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
j = D("j")
g = E("g")
i = F("i")
c = C("c")
f = F("f")

n.r = j
n.t = j
n.o = g
n.z = e
l.r = f
l.u = j
e.y = f
e.r = j
e.z = l
e.t = l
e.p = l
e.v = n
j.y = g
j.v = g
j.w = g
j.z = l
j.t = c
g.s = f
g.y = f
g.q = e
i.t = j
i.q = l
i.s = g
i.y = g
i.z = g
i.p = n
c.y = i
c.r = j
c.z = l
c.t = l
c.p = l
c.v = n
f.t = j
f.q = l
f.s = g
f.y = g
f.z = g
f.p = n
assert n.o.y.p.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: E = None
        self.z: C = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: B = None
        self.v: E = None
        self.w: E = None
        self.t: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: F = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.q: B = None
        self.s: E = None
        self.p: A = None
        self.y: E = None
        self.z: E = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
j = D("j")
g = E("g")
i = F("i")
c = C("c")
f = F("f")

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