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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: I = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: E = None
        self.s: D = None
        self.w: F = None
        self.u: G = None
        self.q: G = None
        self.p: A = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: I = None
        self.s: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: G = None
        self.y: I = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: B = None
        self.w: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: E = None
        self.s: D = None
        self.w: F = None
        self.u: G = None
        self.q: G = None
        self.p: A = None
        self.z: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

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

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

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