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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.y: B = None
        self.q: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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