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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.p: I = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: I = None
        self.z: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: G = None
        self.o: E = None
        self.s: D = None
        self.z: I = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.p: H = None
        self.q: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: F = None
        self.p: I = None
        self.s: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.p: I = None
        self.z: F = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: G = None
        self.o: E = None
        self.s: D = None
        self.z: I = None
        self.r: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: A = None
        self.r: A = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.t: A = None
        self.p: H = None
        self.q: H = None
        self.txt = txt

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

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