class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: A = None
        self.v: E = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.x: F = None
        self.q: F = None
        self.s: D = None
        self.w: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.v: A = None
        self.q: D = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: B = None
        self.t: A = None
        self.v: A = None
        self.x: F = None
        self.txt = txt

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

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

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

k = A("k")
m = B("m")
g = C("g")
a = D("a")
n = E("n")
f = F("f")
c = G("c")
b = A("b")

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.x: F = None
        self.q: F = None
        self.s: D = None
        self.w: D = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.v: A = None
        self.q: D = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.o: B = None
        self.t: A = None
        self.v: A = None
        self.x: F = None
        self.txt = txt

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

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

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

k = A("k")
m = B("m")
g = C("g")
a = D("a")
n = E("n")
f = F("f")
c = G("c")
b = A("b")

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