class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: E = None
        self.x: H = None
        self.q: C = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: I = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: I = None
        self.x: A = None
        self.q: D = None
        self.p: E = None
        self.y: F = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: C = None
        self.y: I = None
        self.s: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: I = None
        self.s: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: I = None
        self.x: A = None
        self.q: D = None
        self.p: E = None
        self.y: F = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.w: C = None
        self.y: I = None
        self.s: F = None
        self.txt = txt

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

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

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