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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: E = None
        self.t: D = None
        self.x: B = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.o: C = None
        self.t: E = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: E = None
        self.t: D = None
        self.x: B = None
        self.y: E = None
        self.w: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.q: B = None
        self.o: C = None
        self.t: E = None
        self.p: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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