class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.s: F = None
        self.w: G = None
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.v: F = None
        self.x: F = None
        self.z: I = None
        self.w: B = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.p: E = None
        self.q: H = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: H = None
        self.y: B = None
        self.o: H = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.t: G = None
        self.o: E = None
        self.s: G = None
        self.v: G = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.o: A = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.z: G = None
        self.u: A = None
        self.v: A = None
        self.s: B = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

b = A("b")
h = B("h")
d = C("d")
e = D("e")
f = E("f")
n = F("n")
c = G("c")
a = H("a")
l = I("l")
k = E("k")

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

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

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.v: F = None
        self.x: F = None
        self.z: I = None
        self.w: B = None
        self.q: G = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: E = None
        self.p: E = None
        self.q: H = None
        self.x: F = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.w: H = None
        self.y: B = None
        self.o: H = None
        self.q: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: A = None
        self.z: H = None
        self.t: G = None
        self.o: E = None
        self.s: G = None
        self.v: G = None
        self.u: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: A = None
        self.y: G = None
        self.o: A = None
        self.p: G = None
        self.z: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.z: G = None
        self.u: A = None
        self.v: A = None
        self.s: B = None
        self.y: F = None
        self.w: H = None
        self.txt = txt

b = A("b")
h = B("h")
d = C("d")
e = D("e")
f = E("f")
n = F("n")
c = G("c")
a = H("a")
l = I("l")
k = E("k")

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