class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.y: D = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

i = A("i")
k = B("k")
e = C("e")
n = D("n")
m = E("m")
h = F("h")
b = G("b")
j = A("j")

i.z = n
i.u = h
i.t = b
i.x = j
k.u = b
k.r = b
k.y = b
k.v = e
k.z = m
e.z = h
e.w = k
e.y = n
e.r = n
e.v = m
n.u = h
n.o = h
n.s = e
n.x = k
m.s = h
m.r = n
m.o = j
h.w = n
h.t = m
h.p = j
b.t = n
j.z = n
j.u = h
j.t = b
j.x = i
assert m.s.w.o.t.txt == "
class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.u: F = None
        self.t: G = None
        self.x: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.w: B = None
        self.y: D = None
        self.r: D = None
        self.v: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: E = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

i = A("i")
k = B("k")
e = C("e")
n = D("n")
m = E("m")
h = F("h")
b = G("b")
j = A("j")

i.z = n
i.u = h
i.t = b
i.x = j
k.u = b
k.r = b
k.y = b
k.v = e
k.z = m
e.z = h
e.w = k
e.y = n
e.r = n
e.v = m
n.u = h
n.o = h
n.s = e
n.x = k
m.s = h
m.r = n
m.o = j
h.w = n
h.t = m
h.p = j
b.t = n
j.z = n
j.u = h
j.t = b
j.x = i
assert m.s.w.o.t.txt == "m"