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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: H = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: H = None
        self.y: G = None
        self.r: I = None
        self.p: A = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.q: G = None
        self.p: H = None
        self.v: F = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.u: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.o: H = None
        self.x: A = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: H = None
        self.y: G = None
        self.r: I = None
        self.p: A = None
        self.o: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: G = None
        self.q: G = None
        self.p: H = None
        self.v: F = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.u: A = None
        self.txt = txt

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

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