class A:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: B = None
        self.s: B = None
        self.p: E = None
        self.t: H = None
        self.z: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: E = None
        self.y: E = None
        self.z: F = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.s: H = None
        self.w: E = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

c = A("c")
k = B("k")
b = C("b")
g = D("g")
l = E("l")
h = F("h")
m = G("m")
j = H("j")
a = F("a")

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

class B:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: E = None
        self.y: E = None
        self.z: F = None
        self.r: C = None
        self.s: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: B = None
        self.s: H = None
        self.w: E = None
        self.x: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

c = A("c")
k = B("k")
b = C("b")
g = D("g")
l = E("l")
h = F("h")
m = G("m")
j = H("j")
a = F("a")

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