class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: I = None
        self.u: I = None
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.o: G = None
        self.y: C = None
        self.v: F = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: H = None
        self.v: B = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

j = A("j")
c = B("c")
b = C("b")
m = D("m")
l = E("l")
n = F("n")
g = G("g")
f = H("f")
i = I("i")
a = I("a")

j.q = n
j.y = a
j.u = a
j.r = b
c.y = l
c.x = b
b.t = f
b.w = c
b.x = m
b.y = j
m.x = f
m.y = g
m.o = i
l.q = b
l.y = b
l.u = f
l.r = f
l.o = g
l.v = n
n.v = i
n.t = l
n.p = j
n.y = g
g.o = i
g.x = m
f.x = c
f.y = j
i.s = n
i.o = f
i.v = c
i.u = j
i.w = m
a.s = n
a.o = f
a.v = c
a.u = j
a.w = m
assert g.o.w.o.o.y.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.y: I = None
        self.u: I = None
        self.r: C = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: H = None
        self.o: G = None
        self.y: C = None
        self.v: F = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.t: E = None
        self.p: A = None
        self.y: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.y: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: H = None
        self.v: B = None
        self.u: A = None
        self.w: D = None
        self.txt = txt

j = A("j")
c = B("c")
b = C("b")
m = D("m")
l = E("l")
n = F("n")
g = G("g")
f = H("f")
i = I("i")
a = I("a")

j.q = n
j.y = a
j.u = a
j.r = b
c.y = l
c.x = b
b.t = f
b.w = c
b.x = m
b.y = j
m.x = f
m.y = g
m.o = i
l.q = b
l.y = b
l.u = f
l.r = f
l.o = g
l.v = n
n.v = i
n.t = l
n.p = j
n.y = g
g.o = i
g.x = m
f.x = c
f.y = j
i.s = n
i.o = f
i.v = c
i.u = j
i.w = m
a.s = n
a.o = f
a.v = c
a.u = j
a.w = m
assert g.o.w.o.o.y.txt == "j"