class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: D = None
        self.w: G = None
        self.r: F = None
        self.q: G = None
        self.t: G = None
        self.o: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: G = None
        self.w: A = None
        self.o: D = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.q: D = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: E = None
        self.x: B = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: G = None
        self.w: A = None
        self.o: D = None
        self.s: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: E = None
        self.q: D = None
        self.u: G = None
        self.o: D = None
        self.txt = txt

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

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