class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.v: F = None
        self.q: C = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: A = None
        self.p: D = None
        self.v: C = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: D = None
        self.v: F = None
        self.q: C = None
        self.u: A = None
        self.p: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.z: E = None
        self.w: A = None
        self.p: D = None
        self.v: C = None
        self.u: C = None
        self.x: A = None
        self.txt = txt

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

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