class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: D = None
        self.v: A = None
        self.p: A = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.u: D = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: B = None
        self.x: G = None
        self.w: C = None
        self.t: E = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.x: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: D = None
        self.v: A = None
        self.p: A = None
        self.y: A = None
        self.s: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: E = None
        self.u: D = None
        self.s: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.o: B = None
        self.x: G = None
        self.w: C = None
        self.t: E = None
        self.v: I = None
        self.txt = txt

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

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

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