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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.y: C = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: F = None
        self.r: E = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.y: C = None
        self.q: G = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: D = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: F = None
        self.r: E = None
        self.o: D = None
        self.y: E = None
        self.txt = txt

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

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