class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: D = None
        self.t: B = None
        self.txt = txt

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

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

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