class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.t: D = None
        self.o: H = None
        self.x: H = None
        self.y: B = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: D = None
        self.r: C = None
        self.u: H = None
        self.z: E = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: I = None
        self.u: A = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.t: E = None
        self.w: A = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: D = None
        self.r: C = None
        self.u: H = None
        self.z: E = None
        self.w: I = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.v: F = None
        self.w: I = None
        self.u: A = None
        self.r: D = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.o: D = None
        self.t: E = None
        self.w: A = None
        self.z: C = None
        self.x: F = None
        self.txt = txt

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

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

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