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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: A = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: A = None
        self.y: C = None
        self.q: C = None
        self.txt = txt

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

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

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

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