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

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: I = None
        self.w: C = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.z: A = None
        self.v: E = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

l.w = f
l.s = c
l.z = i
l.t = i
l.p = i
l.u = e
l.x = m
e.s = f
e.p = f
e.t = i
e.w = a
e.o = j
a.t = i
a.v = c
j.o = e
j.u = l
j.t = l
j.v = b
j.s = b
j.z = c
j.p = n
b.p = e
b.w = c
f.r = c
f.x = c
f.o = i
f.u = n
f.w = n
f.t = a
c.x = l
c.z = l
c.o = a
c.u = a
c.v = m
c.r = e
n.q = a
i.s = a
i.r = m
i.w = j
m.p = e
m.w = c
assert n.q.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.s: G = None
        self.z: I = None
        self.u: B = None
        self.x: E = None
        self.t: I = None
        self.p: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.t: I = None
        self.w: C = None
        self.p: F = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: C = None
        self.z: A = None
        self.v: E = None
        self.u: C = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

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

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