class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.w: I = None
        self.q: G = None
        self.v: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.s: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: H = None
        self.s: E = None
        self.z: E = None
        self.x: H = None
        self.p: A = None
        self.u: I = None
        self.o: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.v: G = None
        self.z: D = None
        self.o: I = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: I = None
        self.q: H = None
        self.z: C = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: F = None
        self.p: B = None
        self.s: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.t: H = None
        self.s: E = None
        self.z: E = None
        self.x: H = None
        self.p: A = None
        self.u: I = None
        self.o: H = None
        self.q: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.v: G = None
        self.z: D = None
        self.o: I = None
        self.w: C = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: I = None
        self.q: H = None
        self.z: C = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: H = None
        self.txt = txt

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

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