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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: A = None
        self.r: A = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.w: D = None
        self.p: G = None
        self.q: A = None
        self.t: I = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: D = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: A = None
        self.r: A = None
        self.p: G = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: D = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.w: D = None
        self.p: G = None
        self.q: A = None
        self.t: I = None
        self.s: G = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: D = None
        self.q: B = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: I = None
        self.txt = txt

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

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

i.p = m
i.v = m
i.x = m
i.w = c
i.q = n
i.t = e
n.o = h
n.q = h
n.x = i
n.r = i
n.p = c
j.q = m
j.y = m
j.x = m
j.w = i
j.t = i
j.z = e
j.r = f
j.s = h
j.u = n
m.w = n
m.t = j
m.y = c
a.v = n
a.w = m
a.s = e
h.o = n
h.x = i
h.q = i
h.w = m
h.v = m
h.p = c
h.s = c
h.t = f
c.y = e
c.w = m
c.q = n
c.z = j
e.s = c
e.o = f
f.z = a
f.u = a
f.y = a
f.o = m
f.q = h
f.p = n
f.r = c
assert i.q.r.p.t.r.r.w.txt == "m"