class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.w: D = None
        self.v: I = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: E = None
        self.v: H = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: B = None
        self.o: B = None
        self.x: C = None
        self.s: I = None
        self.y: H = None
        self.t: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: H = None
        self.o: E = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.s: E = None
        self.v: H = None
        self.o: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: B = None
        self.o: B = None
        self.x: C = None
        self.s: I = None
        self.y: H = None
        self.t: E = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.y: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: G = None
        self.txt = txt

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

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