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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.x: A = None
        self.q: E = None
        self.p: E = None
        self.y: G = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: I = None
        self.x: I = None
        self.r: I = None
        self.v: G = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.r: B = None
        self.p: C = None
        self.o: I = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.o: E = None
        self.u: I = None
        self.q: I = None
        self.v: C = None
        self.y: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.r: C = None
        self.p: F = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.p: H = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: A = None
        self.x: A = None
        self.q: E = None
        self.p: E = None
        self.y: G = None
        self.o: B = None
        self.r: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: I = None
        self.x: I = None
        self.r: I = None
        self.v: G = None
        self.w: A = None
        self.s: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.r: B = None
        self.p: C = None
        self.o: I = None
        self.q: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: E = None
        self.o: E = None
        self.u: I = None
        self.q: I = None
        self.v: C = None
        self.y: I = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.w: B = None
        self.r: C = None
        self.p: F = None
        self.y: B = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.p: H = None
        self.u: C = None
        self.txt = txt

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

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