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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: H = None
        self.x: I = None
        self.z: G = None
        self.s: G = None
        self.q: D = None
        self.v: G = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.s: C = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.p: D = None
        self.q: E = None
        self.o: G = None
        self.z: E = None
        self.t: G = None
        self.w: C = None
        self.x: D = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
m = D("m")
d = E("d")
c = F("c")
i = G("i")
g = H("g")
a = I("a")
b = H("b")

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.t: H = None
        self.x: I = None
        self.z: G = None
        self.s: G = None
        self.q: D = None
        self.v: G = None
        self.y: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.s: C = None
        self.t: H = None
        self.u: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.u: F = None
        self.p: D = None
        self.q: E = None
        self.o: G = None
        self.z: E = None
        self.t: G = None
        self.w: C = None
        self.x: D = None
        self.txt = txt

n = A("n")
l = B("l")
e = C("e")
m = D("m")
d = E("d")
c = F("c")
i = G("i")
g = H("g")
a = I("a")
b = H("b")

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