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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.u: A = None
        self.q: I = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: H = None
        self.u: A = None
        self.q: I = None
        self.y: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: B = None
        self.q: E = None
        self.txt = txt

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

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

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