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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: H = None
        self.p: C = None
        self.w: D = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: H = None
        self.q: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.z: H = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.t: G = None
        self.r: H = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: H = None
        self.p: C = None
        self.w: D = None
        self.z: E = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: H = None
        self.q: B = None
        self.o: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: G = None
        self.z: H = None
        self.q: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: D = None
        self.t: G = None
        self.r: H = None
        self.w: C = None
        self.o: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: G = None
        self.y: G = None
        self.txt = txt

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

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