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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.q: C = None
        self.p: C = None
        self.r: B = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.x: D = None
        self.r: G = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: B = None
        self.q: C = None
        self.p: C = None
        self.r: B = None
        self.y: F = None
        self.z: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: G = None
        self.x: D = None
        self.r: G = None
        self.s: G = None
        self.u: D = None
        self.txt = txt

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

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

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