class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.x: H = None
        self.z: E = None
        self.t: H = None
        self.v: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: I = None
        self.v: G = None
        self.q: H = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: H = None
        self.x: D = None
        self.w: D = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.o: A = None
        self.x: E = None
        self.y: C = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: I = None
        self.v: G = None
        self.q: H = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: H = None
        self.x: D = None
        self.w: D = None
        self.o: H = None
        self.v: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.v: C = None
        self.o: A = None
        self.x: E = None
        self.y: C = None
        self.r: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.v: D = None
        self.p: A = None
        self.txt = txt

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

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

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