class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: C = None
        self.v: F = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

i = A("i")
a = B("a")
m = C("m")
c = D("c")
j = E("j")
k = F("k")
h = C("h")
n = F("n")
d = D("d")
e = D("e")

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: C = None
        self.v: F = None
        self.u: C = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: B = None
        self.w: A = None
        self.txt = txt

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

i = A("i")
a = B("a")
m = C("m")
c = D("c")
j = E("j")
k = F("k")
h = C("h")
n = F("n")
d = D("d")
e = D("e")

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