class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

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

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

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

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