class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: C = None
        self.u: F = None
        self.z: G = None
        self.s: H = None
        self.x: H = None
        self.v: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.z: C = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: I = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: G = None
        self.z: C = None
        self.x: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.z: I = None
        self.w: C = None
        self.s: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

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

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