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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.p: D = None
        self.v: E = None
        self.w: H = None
        self.t: F = None
        self.s: B = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: I = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: H = None
        self.p: E = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: C = None
        self.p: D = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.t: E = None
        self.y: G = None
        self.o: G = None
        self.w: I = None
        self.z: A = None
        self.p: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.z: F = None
        self.p: D = None
        self.v: E = None
        self.w: H = None
        self.t: F = None
        self.s: B = None
        self.r: A = None
        self.q: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: I = None
        self.o: B = None
        self.q: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: H = None
        self.p: E = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.w: C = None
        self.p: D = None
        self.z: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.t: E = None
        self.y: G = None
        self.o: G = None
        self.w: I = None
        self.z: A = None
        self.p: I = None
        self.txt = txt

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

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

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