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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.y: D = None
        self.x: C = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.w: F = None
        self.v: G = None
        self.u: H = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.o: D = None
        self.z: B = None
        self.u: D = None
        self.y: H = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.txt = txt

g = A("g")
i = B("i")
e = C("e")
h = D("h")
m = E("m")
j = F("j")
b = G("b")
f = H("f")
l = E("l")
a = G("a")

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.z: F = None
        self.y: D = None
        self.x: C = None
        self.v: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: B = None
        self.w: F = None
        self.v: G = None
        self.u: H = None
        self.p: G = None
        self.q: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.q: D = None
        self.o: D = None
        self.z: B = None
        self.u: D = None
        self.y: H = None
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: D = None
        self.txt = txt

g = A("g")
i = B("i")
e = C("e")
h = D("h")
m = E("m")
j = F("j")
b = G("b")
f = H("f")
l = E("l")
a = G("a")

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