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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: H = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: E = None
        self.p: B = None
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.u: H = None
        self.p: A = None
        self.s: A = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: H = None
        self.r: E = None
        self.z: B = None
        self.v: A = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: H = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.y: E = None
        self.p: B = None
        self.x: I = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: B = None
        self.u: H = None
        self.p: A = None
        self.s: A = None
        self.y: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.s: H = None
        self.r: E = None
        self.z: B = None
        self.v: A = None
        self.t: H = None
        self.txt = txt

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

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