class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: F = None
        self.p: D = None
        self.u: F = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: F = None
        self.p: D = None
        self.u: F = None
        self.r: F = None
        self.t: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: A = None
        self.w: C = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: D = None
        self.q: D = None
        self.p: D = None
        self.txt = txt

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

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

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

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