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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: A = None
        self.s: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.v: F = None
        self.z: F = None
        self.u: C = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.q: E = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

h = A("h")
e = B("e")
m = C("m")
j = D("j")
b = E("b")
k = F("k")
i = G("i")
g = E("g")

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

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

class C:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: A = None
        self.s: G = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: F = None
        self.v: F = None
        self.z: F = None
        self.u: C = None
        self.s: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: A = None
        self.q: E = None
        self.z: C = None
        self.s: C = None
        self.txt = txt

h = A("h")
e = B("e")
m = C("m")
j = D("j")
b = E("b")
k = F("k")
i = G("i")
g = E("g")

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