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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: A = None
        self.u: A = None
        self.x: C = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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