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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.o: D = None
        self.s: B = None
        self.z: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: C = None
        self.y: G = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: E = None
        self.w: G = None
        self.u: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: E = None
        self.o: D = None
        self.s: B = None
        self.z: F = None
        self.txt = txt

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

h.z = e
h.s = f
h.x = i
b.v = h
b.u = h
b.s = k
b.y = e
k.v = h
m.u = e
f.y = d
f.w = c
f.u = i
i.t = b
c.y = h
c.u = d
c.o = m
c.s = b
c.z = i
e.y = h
e.u = d
e.o = m
e.s = b
e.z = i
n.v = h
d.y = f
d.w = e
d.u = i
assert m.u.u.u.t.s.v.x.t.y.txt == "e"