class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.o: F = None
        self.t: H = None
        self.x: H = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: I = None
        self.v: H = None
        self.w: I = None
        self.z: B = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: A = None
        self.w: F = None
        self.t: C = None
        self.p: E = None
        self.q: G = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.q: F = None
        self.y: C = None
        self.x: H = None
        self.v: D = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.s: A = None
        self.o: F = None
        self.t: H = None
        self.x: H = None
        self.p: E = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: I = None
        self.v: H = None
        self.w: I = None
        self.z: B = None
        self.t: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.x: A = None
        self.w: F = None
        self.t: C = None
        self.p: E = None
        self.q: G = None
        self.z: C = None
        self.o: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.p: F = None
        self.q: F = None
        self.y: C = None
        self.x: H = None
        self.v: D = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

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