class A:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: I = None
        self.u: C = None
        self.z: C = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.z: I = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: H = None
        self.w: I = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: H = None
        self.r: C = None
        self.u: A = None
        self.w: C = None
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.s: C = None
        self.z: I = None
        self.x: A = None
        self.r: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: H = None
        self.w: I = None
        self.r: C = None
        self.t: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.s: E = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: H = None
        self.r: C = None
        self.u: A = None
        self.w: C = None
        self.p: G = None
        self.s: C = None
        self.txt = txt

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

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