class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: C = None
        self.z: 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.r: I = None
        self.x: F = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: E = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.q: D = None
        self.z: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

n = A("n")
l = B("l")
j = C("j")
d = D("d")
k = E("k")
i = F("i")
c = G("c")
g = H("g")
e = I("e")

n.u = c
n.w = j
n.z = j
l.s = d
j.r = e
j.x = i
j.v = i
j.y = k
d.w = j
d.y = k
d.x = i
d.r = i
k.u = g
k.y = i
k.q = d
k.o = d
k.z = l
i.y = j
c.s = j
c.u = g
c.t = d
c.o = n
c.y = l
c.z = l
c.q = i
g.x = c
g.u = d
e.o = c
e.t = c
e.x = g
e.y = d
e.v = n
assert i.y.v.y.y.q.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: C = None
        self.z: 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.r: I = None
        self.x: F = None
        self.y: E = None
        self.v: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: E = None
        self.x: F = None
        self.r: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: F = None
        self.q: D = None
        self.z: B = None
        self.o: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

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

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

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

n = A("n")
l = B("l")
j = C("j")
d = D("d")
k = E("k")
i = F("i")
c = G("c")
g = H("g")
e = I("e")

n.u = c
n.w = j
n.z = j
l.s = d
j.r = e
j.x = i
j.v = i
j.y = k
d.w = j
d.y = k
d.x = i
d.r = i
k.u = g
k.y = i
k.q = d
k.o = d
k.z = l
i.y = j
c.s = j
c.u = g
c.t = d
c.o = n
c.y = l
c.z = l
c.q = i
g.x = c
g.u = d
e.o = c
e.t = c
e.x = g
e.y = d
e.v = n
assert i.y.v.y.y.q.r.y.txt == "j"