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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.r: A = None
        self.y: E = None
        self.x: D = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.z: C = None
        self.s: E = None
        self.v: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: G = None
        self.r: A = None
        self.y: E = None
        self.x: D = None
        self.z: E = None
        self.p: D = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: B = None
        self.u: E = None
        self.z: C = None
        self.s: E = None
        self.v: F = None
        self.txt = txt

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

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