class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

g.v = c
g.u = c
g.t = f
g.s = m
b.t = k
d.x = g
d.z = c
d.v = c
d.o = b
d.u = m
d.t = f
d.s = f
c.x = b
k.t = b
k.r = f
k.w = f
k.o = g
k.s = m
k.z = d
k.u = c
f.t = c
f.y = g
m.r = c
assert d.x.t.t.x.t.t.t.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.u: D = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

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