class A:
    def __init__(self, txt: str):
        self.w: H = None
        self.z: G = None
        self.v: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.v: E = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = None
        self.y: F = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: G = None
        self.v: E = None
        self.q: B = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: G = None
        self.y: F = None
        self.o: C = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

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